/*
 * Copyright (c) 2006, 2023, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.util.Calendar;
import java.util.Random;

/**
 * <p>Project: jse2302 - If2
 * <p>Powered by webrx On 2023-06-12 11:40:53
 * <p>Created by IntelliJ IDEA
 *
 * @author  webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class If2 {
    public static void main(String[] args) {
        Calendar c = Calendar.getInstance();
        int w = c.get(Calendar.DAY_OF_WEEK);
        if (w == 1) System.out.println("星期日");
        if (w == 2) System.out.println("星期一");
        if (w == 3) System.out.println("星期二");
        if (w == 4) System.out.println("星期三");
        if (w == 5) System.out.println("星期四");
        if (w == 6) System.out.println("星期五");
        if (w == 7) System.out.println("星期六");

        if (w == 1) {
            System.out.println("星期日");
        } else if (w == 2) {
            System.out.println("星期一");
        } else if (w == 3) {
            System.out.println("星期二");
        } else if (w == 4) {
            System.out.println("星期三");
        } else if (w == 5) {
            System.out.println("星期四");
        } else if (w == 6) {
            System.out.println("星期五");
        } else {
            System.out.println("星期六");
        }

        int i;

        if ((i = 16) > 5) {
            System.out.println("ok");
        }

        //red hello green hello

        Random rand = new Random();
        if (rand.nextBoolean()) {
            System.out.println("\033[31mhello\033[0m");
        } else {
            System.out.println("\033[32mhello\033[0m");
        }

        if (Math.random() > .5) {
            System.out.println("\033[31mhello\033[0m");
        } else {
            System.out.println("\033[32mhello\033[0m");
        }

        System.out.printf("\033[%dmhello\033[0m", Math.random() > .5 ? 31 : 32);


    }
}
